<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:76:"E:\www\paobanglang\nav/../application/admin\view\order\dispatch_express.html";i:1519868748;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\header.html";i:1512184095;s:66:"E:\www\paobanglang\nav/../application/admin\view\public\pages.html";i:1519866533;s:67:"E:\www\paobanglang\nav/../application/admin\view\Public\footer.html";i:1516863870;}*/ ?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台管理</title>
   
    <link rel="stylesheet" href="__STATIC__/admin/css/amazeui.min.css" />
    <link rel="stylesheet" href="__STATIC__/admin/css/admin.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/style.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/pintuer.css">
    <link rel="stylesheet" href="__STATIC__/admin/css/app.css">
    <script src="__STATIC__/admin/js/jquery.min.js"></script>
    <script src="__STATIC__/admin/js/amazeui.min.js"></script>
    <script src="__STATIC__/admin/js/pintuer.js"></script>
    <script src="__STATIC__/admin/js/app.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
</head>
<body>
<style>
    *{
        margin:0;
        padding:0;
    }
    body{
        background: #ffffff;
    }
    .star{
        font-size: 30px;
    }
</style>
<table class="am-table am-table-striped am-table-hover table-main">
  <tr>
      <th width="30"></th>
      <th width="50"><?php echo lang('label')['headimg']; ?></th>
      <th width="100"><?php echo lang('label')['name']; ?></th>
      <!--<th width="100"><?php echo lang('label')['phone']; ?></th>
      <th width="100">性别</th>-->
      <th width="80">状态</th>
      <th width="80">类型
          <div style="float: right;margin-right: 10px;font-size: 13px" onclick="refrush()" title="刷新">
              <span id="number" style="color: red">30</span>
              <i id="refrush" style="color: red" class="am-icon-refresh"></i>
          </div>
      </th>
  </tr>
    <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$express): $mod = ($i % 2 );++$i;?>
    <tr class="order_tr" id="<?php echo $express['id']; ?>" name="<?php echo $express['lng']; ?>,<?php echo $express['lat']; ?>">
        <td style="padding: 0;text-align: center"><span style="color: red;display: none" class="star">⭐</span></td>
        <td><img width="30" class="radius-circle" height="30" src="<?php echo $express['true_head']; ?>"/></td>
        <td style="line-height:30px"><?php echo $express['true_name']; ?></td>
        <!--<td style="line-height:30px"><?php echo $express['phone']; ?></td>
        <td><?php if(!$express['sex'] || $express['sex'] == 0): ?>女<?php elseif($express['sex'] == 1): ?>男<?php else: ?>保密<?php endif; ?></td>-->
        <td><?php if($express['active']): ?>在线<?php else: ?>离线<?php endif; ?></td>
        <td><?php echo $express['express_type_name']; ?></td>
    </tr>
    <?php endforeach; endif; else: echo "" ;endif; ?>
</table>
<?php if($pages['pagetotal'] > 1): 
		$get_arr = request()->get();
		$parameters = '';
		if(count($get_arr) > 0){
			foreach($get_arr as $k => $v){
				if($k != 'page'){
					$parameters .= '&'.$k.'='.$v;
				}
			}
		}
	 ?>
	<div class="am-cf" style="margin-right: 20px;">
		<div class="am-fr">
			<ul class="am-pagination tpl-pagination">
				<li><a href="#">共<?php echo $pages['total']; ?>条数据</a></li>
				<?php if($pages['page'] > 1): ?>
					<li><a href="?page=1<?php echo $parameters; ?>">«</a></li>
				<?php endif; $__FOR_START_32217__=$pages['page']-2;$__FOR_END_32217__=$pages['page']+3;for($i=$__FOR_START_32217__;$i < $__FOR_END_32217__;$i+=1){ if($i > 0 && $i <= $pages['pagetotal']): ?>
						<li <?php if($pages['page'] == $i): ?>class="am-active"<?php endif; ?> >
							<a href="?page=<?php echo $i; ?><?php echo $parameters; ?>"><?php echo $i; ?></a>
						</li>
					<?php endif; } if($pages['page'] < $pages['pagetotal']): ?>
					<li><a href="?page=<?php echo $pages['pagetotal']; ?><?php echo $parameters; ?>">»</a></li>
				<?php endif; ?>
			</ul>
		</div>
	</div>
<?php endif; ?>

<script>
    var number = $("#number").html();
    //console.log(number);exit;
    function auto(){
        number--;
        $("#number").html(number);
        if(number > 0){
            setTimeout(function () {
                auto();
            },1000);
        }else{
            refrush();
        }
    }
    auto();//自动运行
    //刷新
    function refrush() {
        $("#refrush").attr('class','am-icon-refresh am-icon-spin');
        setTimeout(function (){
            window.location.reload();
        },1000);
    }
  //选择订单id
 $(".order_tr").click(function (){
        parent.express_id = this.id;
        var order_id = parent.order_id;
        if(order_id !== 0){
            parent.$("#iframe").attr("src",'__URL__/dispatch?order_id='+order_id+'&express_id='+this.id);
        }else{
            parent.$("#iframe").attr("src",'http://uri.amap.com/marker?position='+$(this).attr('name'));
        }
        $(".order_tr").find('.star').css('display','none');
        $(this).find('.star').css('display','');
    });
</script>
<script src="__STATIC__/admin/js/jquery.min.js"></script>
<script src="__STATIC__/admin/js/amazeui.min.js"></script>
<script src="__STATIC__/admin/js/pintuer.js"></script>
<script src="__STATIC__/admin/js/app.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/admin/layer/extend/layer.ext.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laydate/laydate.js"></script>
<script type="text/javascript" src="__STATIC__/admin/laytpl/laytpl.js"></script>
<script>
    $('.upload').on('click',function (){
            var id = $(this).attr('data-id');
            upload(id);
        }
    );
    function upload(id){
        layer.open({
            type:2,
            title:false,
            area: ['70%', '90%'],
            offset: '5%',
            content: "<?php echo url('/admin/material'); ?>?id="+id
        });
    }
</script>
<?php if(request()->isPost()): ?>
<script>
    layer.msg('操作完成！');
    setTimeout(function (){
        parent.window.location.href = parent.window.location.href;
    },800);
</script>
<?php endif; ?>
</body>
</html>